package com.cqu.lpss.controller;

import com.cqu.lpss.pojo.Class;
import com.cqu.lpss.pojo.Result;
import com.cqu.lpss.service.impl.ClassImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/class")
public class ClassController {
    @Autowired
    ClassImpl classImpl;
    @GetMapping
    public Result list(){
        List<Class> classlist = classImpl.listAll();
        return Result.success(classlist);
    }
}
